import request from '../utils/request'

//获取系统用户分页列表数据
export function listUser(query){
    return request({
        url:'/admin/user/list',
        method:'get',
        params:query
    })
}

//新增用户
export function addUser(data){
    return request({
        url:'/admin/user/add',
        method:'post',
        data:data
    })
}

//删除用户
export function delUser(id){
    return request({
        url:'/admin/user/' +  id,
        method:'delete'
    })
}

//获取用户信息
export function getUser(id){
    return request({
        url:'/admin/user/'+id,
        method:'get'
    })
}
//修改用户信息
export function updateUser(data){
    return request({
        url:'/admin/user/update',
        method:'put',
        data:data
    })
}